@import "../../styles/variables";

.timeline {
  margin: 70px 30px;
  display: flex;
  height: 2px;
  position: relative;
}

.timeline-past {
  background-color: $color-secondary;
  flex: 0 0 70%;
  max-width: 70%;
  display: flex;
}

.timeline-future {
  background-color: $color-primary;
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
}

.timeline-item {
  position: relative;
  flex: 1;
}

.timeline-start,
.timeline-finish {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  position: absolute;
  top: -15px;
}

.timeline-finish {
  .timeline-item-bottom-text {
    right: 0;
    width: auto;
  }
}

.timeline-start {
  background-color: $color-secondary;
  left: 0;
}
.timeline-finish {
  background-color: $color-primary;
  right: 0;
}
.timeline-start-text,
.timeline-finish-text {
  position: absolute;
  width: 90px;
  font-size: $fs-smaller;
  top: -25px;
}
.timeline-finish-text {
  text-align: right;
  right: -10px;
}
.timeline-item-node {
  position: absolute;
  right: 0;
  top: -7px;
  cursor: pointer;
}
.timeline-item-dot {
  position: absolute;
  display: flex;
  width: 15px;
  height: 15px;
  right: 0;
  border-radius: 50%;
  user-select: none;
  justify-content: center;
  align-items: center;

  .timeline-past & {
    background-color: $color-secondary;
  }
  .timeline-future & {
    background-color: $color-primary;
  }
}

.timeline-item--selected .timeline-item-dot {
  transform: scale(1.5);
  right: 0;
  cursor: default;
  &:after {
    content: "";
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
  }
}

.timeline-item-text {
  font-size: 10px;
  width: 90px;
  text-align: center;
  position: absolute;
  top: -22px;
  transform: translateX(-58%);
}

.timeline-item-bottom-text {
  position: absolute;
  width: 90px;
  top: 40px;
}
